package com.ziyun.erp.modules.business.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.ziyun.erp.modules.business.entity.OrderSellerScholarshipEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 黑名单商户订单奖励金
 * 
 * @author jiangli
 * @email 
 * @date 2018-12-19 11:02:22
 */
public interface OrderSellerScholarshipDao extends BaseMapper<OrderSellerScholarshipEntity> {


    List<OrderSellerScholarshipEntity> list(@Param("page")Pagination page, @Param("map")Map<String, Object> map);

    @Select("SELECT a.*,b.seller_name FROM order_seller_scholarship a LEFT JOIN seller_info b USING(seller_id) WHERE a.id=#{id}")
    OrderSellerScholarshipEntity findOne(Integer id);

    @Select("SELECT seller_id,seller_name FROM seller_info WHERE disabled=0")
    List<Map<String, Object>> sellerList();
}
